package com.zpark.springboottest.pojo;

import com.zpark.springboottest.group.Group1;
import com.zpark.springboottest.group.Group2;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class Address {
    @NotBlank(message = "地址不为空")
    @Size(message = "昵称长度 [1-3] ", min = 1, max = 3,groups = {Group1.class})
    @Size(message = "昵称长度 [5-9] ", min = 5, max = 9,groups = {Group2.class})
    private String address;
}
